package com.cheetah.start.module.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * 设置
 *
 * @author xjh
 * @date 2022/03/28
 */
@Data
@TableName("sys_set")
public class SysSet {

    @TableId(type = IdType.INPUT)
    private String setKey;

    private String setValue;

    private String remark;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    public SysSet() {
    }

    public SysSet(String setKey, String setValue) {
        this.setKey = setKey;
        this.setValue = setValue;
        this.createTime = new Date();
    }

    public SysSet(String setKey) {
        this.setKey = setKey;
        this.setValue = "";
        this.createTime = new Date();
    }
}
